<template>
  <div class="QAoption">
      <input type="radio" v-model="picked" :id="id" name="name" :value="score" @change="selected">
      <label :for="id"><slot></slot></label>
  </div>
</template>
<script>
//TODO:非组件需要添加wxshare.js

export default {
  components:{

  },
  props:["score","id","name"],
  data(){
    return {
      picked:''
    }
  },
  methods:{
    selected(){
      this.$emit("getScore",this.picked)
      this.picked = ''
    }
  }
}
</script>
<style lang="less">
  @import '../../../../style/mixin.less';

  .QAoption{
    .fx(row,flex-start);
    .sc(0.5333rem,#000000);
    padding-left: 2rem;
    line-height: 1rem;
    input{
      .wh(.5rem,.5rem);
      margin-right: .3rem;
    }
  }
</style>
